package com.xiaojiu.base;

import android.content.Context;

import rx.Subscription;
/**
 * Author: Othershe
 * Time:  2016/8/11 17:53
 */
public class BasePresenter<V> {
    public V mView;
    protected Subscription mSubscription;
    public Context mContext;

    public void attach(V view, Context context) {
        mView = view;
        this.mContext = context;
    }

    public void detach() {
        mView = null;
        if (mSubscription != null) {
            mSubscription.unsubscribe();
        }
    }
}
